package be.bonamis.timesheet.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import be.bonamis.timesheet.model.Prestation;

/**
 * Specifies methods used to obtain and modify Prestation related information
 * which is stored in the database.
 * @author Florent Bonamis
 */
public interface PrestationRepository extends JpaRepository<Prestation, Long> {
	
	@Query("SELECT p FROM Prestation p WHERE p.project.id = :projectId")
    public List<Prestation> find(@Param("projectId") long projectId);	
}
